package com.cloudservice.ccs.biz;

import com.cloudservice.ccs.entity.Session;
import com.cloudservice.ccs.model.SessionWithLatestMessage;

import java.util.List;
import java.util.Map;

public interface ISessionBiz {
    void save(Session session);

    void update(Integer id, Session session);

    void partialUpdate(Integer id, Map<String, Object> fields);

    void delete(Integer id);

    Session getOne(Integer id);

    List<Session> getAll();

    List<SessionWithLatestMessage> getAllByCustomerServiceId(Integer customerServiceId);

    List<SessionWithLatestMessage> getActiveByCustomerServiceId(Integer customerServiceId);

    List<SessionWithLatestMessage> getHistoryByCustomerServiceId(Integer customerServiceId);

    Session getByCustomerServiceAndVisitor(Integer customerServiceId, String visitorIp);

    Session getAvailableSession(String visitorIp);
}
